/**
 * Copyright &copy; 2015-2020 <a href="http://www.jeeplus.org/">JeePlus</a> All rights reserved.
 */
package com.jeeplus.modules.integralrecord.service;

import java.util.List;

import org.springframework.stereotype.Service;
import org.springframework.transaction.annotation.Transactional;

import com.jeeplus.core.persistence.Page;
import com.jeeplus.core.service.CrudService;
import com.jeeplus.modules.integralrecord.entity.IntegralRecord;
import com.jeeplus.modules.integralrecord.mapper.IntegralRecordMapper;

/**
 * 积分抽奖记录Service
 * @author w
 * @version 2021-03-09
 */
@Service
@Transactional(readOnly = true)
public class IntegralRecordService extends CrudService<IntegralRecordMapper, IntegralRecord> {

	public IntegralRecord get(String id) {
		return super.get(id);
	}
	
	public List<IntegralRecord> findList(IntegralRecord integralRecord) {
		return super.findList(integralRecord);
	}
	
	public Page<IntegralRecord> findPage(Page<IntegralRecord> page, IntegralRecord integralRecord) {
		return super.findPage(page, integralRecord);
	}
	
	@Transactional(readOnly = false)
	public void save(IntegralRecord integralRecord) {
		super.save(integralRecord);
	}
	
	@Transactional(readOnly = false)
	public void delete(IntegralRecord integralRecord) {
		super.delete(integralRecord);
	}

	public IntegralRecord findNewIntegral(String sessionsId) {
		return mapper.findLatestIntegral(sessionsId);
	}
}